package com.ntschy.sys.entity.dto.dictdata;

import com.ntschy.sys.entity.valid.SysDictDataGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author ezreal_geng
 */
@Data
@ApiModel(description = "字典数据新增更新dto")
public class SysDictDataAddUpdateDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "字典数据ID")
    @NotBlank(message = "字典数据ID不能为空", groups = {SysDictDataGroups.Update.class})
    @Length(min = 36, max = 36, message = "字典数据ID不合法", groups = {SysDictDataGroups.Update.class})
    private String dictCode;

    @ApiModelProperty(value = "数据字典类型")
    @NotBlank(message = "数据字典类型不能为空", groups = {SysDictDataGroups.Add.class, SysDictDataGroups.Update.class})
    @Length(max = 25, message = "数据字典类型长度不能超过25个字符", groups = {SysDictDataGroups.Add.class, SysDictDataGroups.Update.class})
    private String dictType;

    @ApiModelProperty(value = "字典数据label")
    @NotBlank(message = "字典数据label不能为空", groups = {SysDictDataGroups.Add.class, SysDictDataGroups.Update.class})
    @Length(max = 25, message = "字典数据label长度不能超过25个字符", groups = {SysDictDataGroups.Add.class, SysDictDataGroups.Update.class})
    private String dictLabel;


    @ApiModelProperty(value = "字典数据值")
    @NotNull(message = "字典数据值不能为空", groups = {SysDictDataGroups.Add.class, SysDictDataGroups.Update.class})
    private Integer dictValue;

    @ApiModelProperty(value = "字典数据排序")
    private Integer dictSort;

    @ApiModelProperty(value = "备注")
    private String remark;
}
